-- story_intro.lua - 修仙游戏开场故事

return {
    -- 游戏开始节点
    {
        id = "intro",
        title = "修仙之路",
        text = [[你是一名普通的山村少年，名叫叶辰。
在一个雷雨交加的夜晚，你偶然发现了一本古老的修仙秘籍。
这本秘籍将改变你的一生...]],
        vars = {
            ["player.name"] = "叶辰",
            ["player.health"] = 100,
            ["player.cultivation"] = "凡人",
            ["player.qi"] = 0,
            ["player.gold"] = 10,
            ["game.stage"] = "beginner"
        },
        choices = {
            {
                text = "立即开始修炼",
                next = "start_cultivation"
            },
            {
                text = "先了解一下秘籍内容",
                next = "study_manual"
            },
            {
                text = "将秘籍藏起来，明天再看",
                next = "hide_manual"
            }
        }
    },
    
    -- 开始修炼节点
    {
        id = "start_cultivation",
        title = "初次修炼",
        text = [[你按照秘籍上的方法开始修炼，感受到一股暖流在体内流动。
虽然过程有些艰难，但你坚持了下来。]],
        vars = {
            ["player.qi"] = 10,
            ["player.cultivation"] = "练气一层",
            ["game.score"] = 10
        },
        choices = {
            {
                text = "继续修炼",
                next = "continue_cultivation"
            },
            {
                text = "出门看看",
                next = "village_outside"
            },
            {
                text = "去村里的药铺",
                next = "village_apothecary"
            }
        }
    },
    
    -- 研究秘籍节点
    {
        id = "study_manual",
        title = "研读秘籍",
        text = [[你仔细研读了这本名为《基础炼气诀》的秘籍。
它详细介绍了修仙的基础知识和练气期的修炼方法。
你对修仙有了初步的了解。]],
        vars = {
            ["player.understanding"] = "basic",
            ["game.score"] = 5
        },
        choices = {
            {
                text = "开始修炼",
                next = "start_cultivation"
            },
            {
                text = "去请教村里的老猎人",
                next = "ask_hunter"
            }
        }
    },
    
    -- 隐藏秘籍节点
    {
        id = "hide_manual",
        title = "谨慎行事",
        text = [[你决定将秘籍藏在床底下的暗格里。
第二天清晨，你被一阵敲门声惊醒。
村长带着几名村民站在你家门口。]],
        vars = {
            ["game.morning"] = true,
            ["game.score"] = 2
        },
        choices = {
            {
                text = "开门询问",
                next = "village_visit"
            },
            {
                text = "假装不在家",
                next = "pretend_absent"
            }
        }
    },
    
    -- 村庄外部节点
    {
        id = "village_outside",
        title = "村庄外",
        text = [[你走出家门，呼吸着新鲜的空气。
村庄外的山林中传来鸟鸣声。
你看到几名村民在田间劳作。]],
        vars = {
            ["game.location"] = "village_outside"
        },
        choices = {
            {
                text = "去山林中看看",
                next = "mountain_forest"
            },
            {
                text = "和村民交谈",
                next = "talk_to_villagers"
            },
            {
                text = "返回家中",
                next = "village_apothecary"
            }
        }
    },
    
    -- 村里的药铺节点
    {
        id = "village_apothecary",
        title = "百草堂",
        text = [[你来到了村里唯一的药铺——百草堂。
药铺老板王伯是个慈祥的老人，他正在整理草药。
看到你进来，他热情地打招呼。]],
        vars = {
            ["game.location"] = "apothecary"
        },
        choices = {
            {
                text = "购买一些草药",
                next = "buy_herbs"
            },
            {
                text = "询问关于修仙的事情",
                next = "ask_about_cultivation"
            },
            {
                text = "离开药铺",
                next = "village_outside"
            }
        }
    }
}